a11y: Update the accessible label for GtkButton
authorEmmanuele Bassi <ebassi@gnome.org>
Mon, 13 Jul 2020 16:04:38 +0000 (17:04 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Sun, 26 Jul 2020 19:31:15 +0000 (20:31 +0100)
gtk/gtkbutton.c

index d9358e3e7504c9d9b9ce782979afd9d1f2defc14..173d4e8bf115c88a4b8f55a9802b71218d19faf6 100644 (file)
@@ -849,6 +849,10 @@ gtk_button_set_label (GtkButton   *button,
   gtk_label_set_label (GTK_LABEL (priv->child), label);
   gtk_button_set_child_type (button, LABEL_CHILD);
 
+  gtk_accessible_update_property (GTK_ACCESSIBLE (button),
+                                  GTK_ACCESSIBLE_PROPERTY_LABEL, label,
+                                  -1);
+
   g_object_notify_by_pspec (G_OBJECT (button), props[PROP_LABEL]);
 }